package com.iris.live.services.data.models;

import javax.persistence.*;

import java.sql.Date;
import java.text.SimpleDateFormat;

/**
 * Created by DF on 9/22/2016.
 */
@Entity
@Table(name = "销售顾问状态", schema = "sg_lsh", catalog = "")
@IdClass(销售顾问状态ModelPK.class)
public class 销售顾问状态Model {
    private String 许可;
    private Date 日期;
    private String 销售顾问;
    private String 状态码;
    private String 是否当班;
    private Integer 排班顺序;

    @Id
    @Column(name = "许可")
    public String get许可() {
        return 许可;
    }

    public void set许可(String 许可) {
        this.许可 = 许可;
    }

    @Id
    @Column(name = "日期")
    public Date get日期() {
        return 日期;
    }
    
    public void set日期(Date 日期) {
        this.日期 = 日期;
    }

    @Id
    @Column(name = "销售顾问")
    public String get销售顾问() {
        return 销售顾问;
    }

    public void set销售顾问(String 销售顾问) {
        this.销售顾问 = 销售顾问;
    }

    @Basic
    @Column(name = "状态码")
    public String get状态码() {
        return 状态码;
    }

    public void set状态码(String 状态码) {
        this.状态码 = 状态码;
    }

    @Basic
    @Column(name = "是否当班")
    public String get是否当班() {
        return 是否当班;
    }

    public void set是否当班(String 是否当班) {
        this.是否当班 = 是否当班;
    }

    @Basic
    @Column(name = "排班顺序")
    public Integer get排班顺序() {
        return 排班顺序;
    }

    public void set排班顺序(Integer 排班顺序) {
        this.排班顺序 = 排班顺序;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        销售顾问状态Model that = (销售顾问状态Model) o;

        if (许可 != null ? !许可.equals(that.许可) : that.许可 != null) return false;
        if (日期 != null ? !日期.equals(that.日期) : that.日期 != null) return false;
        if (销售顾问 != null ? !销售顾问.equals(that.销售顾问) : that.销售顾问 != null) return false;
        if (状态码 != null ? !状态码.equals(that.状态码) : that.状态码 != null) return false;
        if (是否当班 != null ? !是否当班.equals(that.是否当班) : that.是否当班 != null) return false;
        if (排班顺序 != null ? !排班顺序.equals(that.排班顺序) : that.排班顺序 != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = 许可 != null ? 许可.hashCode() : 0;
        result = 31 * result + (日期 != null ? 日期.hashCode() : 0);
        result = 31 * result + (销售顾问 != null ? 销售顾问.hashCode() : 0);
        result = 31 * result + (状态码 != null ? 状态码.hashCode() : 0);
        result = 31 * result + (是否当班 != null ? 是否当班.hashCode() : 0);
        result = 31 * result + (排班顺序 != null ? 排班顺序.hashCode() : 0);
        return result;
    }
}
